<div style="padding:5px;margin-bottom: 15px;">
    <div class="pure-g">
        <div class="pure-u-1 pure-u-md-1-3"></div>
        <div class="pure-u-1 pure-u-md-1-3">
            <form class="pure-form pure-form-stacked">
                <legend>Get Your Card Balance</legend>
                <fieldset class="pure-group ng-scope" ng-repeat="model in models track by $index">
                    <input type="hidden" ng-model="model.accountId"/>
                    <label for="account">
                        account
                        <span style="float: right;cursor: pointer;" ng-click="remove($index)"><i class="iconfont icon-close"></i></span>
                    </label>
                    <input id="account" ng-model="model.account" type="text" class="pure-input-1"
                           placeholder="please input bank acount">

                    <label for="auth" style="margin-top: 10px;">authorization key</label>
                    <input id="auth" ng-model="model.auth" type="text" class="pure-input-1"
                           placeholder="please input authorization key">

                    <label for="bank" style="margin-top: 10px;">select bank</label>
                    <div class="pure-u-2-5">
                        <select id="bank" ng-model="model.bank">
                            <option value="ICBC">ICBC</option>
                            <option value="BOC">BOC</option>
                        </select>
                    </div>

                    <div class="pure-u-1-2">
                        <button class="pure-button button-secondary" ng-if="model.authorized == 0"
                                ng-click="authorize(model)">Authorize
                        </button>
                        <button class="pure-button button-success" ng-if="model.authorized == 1">Authorized</button>
                        <button class="pure-button button-error" ng-if="model.authorized == 2">Authorize fail</button>
                    </div>
                    <div style="margin-top:20px;float: right;" ng-if="model.balance">
                        <span>balance：</span>
                        <span style="color: #0078e7;">{{model.balance.amount}}</span>
                        <span style="color: #666;">{{model.balance.currency}}</span>
                    </div>
                    <hr>
                </fieldset>
                <button class="pure-button" ng-click="addMore()">Add more</button>
                <button class="pure-button pure-button-primary" ng-click="calculate()">Get My Balance</button>

                <div style="padding-top: 10px;font-size: 18px;float: right;" ng-show="page == 2">
                    <span>total balance：</span>
                    <span style="color: #0078e7;">{{totalBalances}}</span>
                    <span style="color: #666;">RMB</span>
                </div>
            </form>
        </div>
        <div class="pure-u-1 pure-u-md-1-3"></div>
    </div>
</div>